;
; Copyright (c) Microsoft Corporation.  All rights reserved.
;
;
; Use of this source code is subject to the terms of the Microsoft end-user
; license agreement (EULA) under which you licensed this SOFTWARE PRODUCT.
; If you did not accept the terms of the EULA, you are not authorized to use
; this source code. For a copy of the EULA, please see the LICENSE.RTF on your
; install media.
;
;******************************************************************************
;*
;* System On Chip(SOC)
;*
;* Copyright (c) 2002 Software Center, Samsung Electronics, Inc.
;* All rights reserved.
;*
;* This software is the confidential and proprietary information of Samsung 
;* Electronics, Inc("Confidential Information"). You Shall not disclose such 
;* Confidential Information and shall use it only in accordance with the terms 
;* of the license agreement you entered into Samsung.
;*
;******************************************************************************

	OPT     2								; disable listing

	INCLUDE kxarm.h
  INCLUDE armmacros.s

	OPT     1								; reenable listing      

	TEXTAREA

	LEAF_ENTRY BreakPoint

		swi 0
		nop
	
	RETURN

	LEAF_ENTRY OEMWriteDebugByte

		;stmfd	sp!, {r1} 
	
pollout 
    mrc  p14, 0, r1, c0, c0, 0  ; Read control register 
    tst  r1, #2 
    bne  pollout         ; if W set, register still full 

  	mcr	p14, 0, r0, c1, c0, 0
  	
  	;ldmfd	sp!, {r1} 
  	  	
    RETURN	

	LEAF_ENTRY OEMReadDebugByte

  	mrc	p14, 0, r0, c1, c0, 0
  	  	
    RETURN	

	END
